﻿namespace Guia.Elements
{
    using System.Windows.Automation;
    using Guia.Locator;

    /// <summary>
    /// This class represents a particular row within a DataGrid_WpfToolkit.
    /// </summary>
    public class DataGridRow_WpfToolkit : AbstractDataGridRow
    {
        /// <summary>
        /// Initializes a new instance of the DataGridRow_WpfToolkit class. 
        /// </summary>
        /// <param name="automationElement">The AutomationElement representating the DataGridRow.</param>
        public DataGridRow_WpfToolkit(AutomationElement automationElement)
            : base(automationElement)
        {
        }

        /// <summary>
        /// Gets the default-condition to find a control by its type.
        /// </summary>
        public static SearchCondition ControlTypeCondition
        {
            get { return SearchCondition.ByControlType(ControlType.DataItem); }
        }

        /// <summary>
        /// Gets a list of the row's cells. 
        /// </summary>
        public DataGridCell_WpfToolkit[] Cells
        {
            get
            {
                return this.GetCells<DataGridCell_WpfToolkit>();
            }
        }
    }
}
